package com.naiterui.ehp.bs.cms.modules.followup.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 随访表单
 * 
 * @author yangfuya
 * @since 2022/1/5
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("dr_follow_up_form")
public class FollowUpForm implements Serializable {

    private static final long serialVersionUID = -7408713554631134542L;
    @TableId
    @ApiModelProperty(value = "主键ID")
    private Long id;

    @ApiModelProperty(value = "表单id")
    private String formId;

    @ApiModelProperty(value = "表单名称")
    private String name;

    @ApiModelProperty(value = "所属医生，为0时表示为所有医生共享")
    private Long doctorId;

    @ApiModelProperty(value = "表单类型，从字典拿")
    private Integer type;

    @ApiModelProperty(value = "状态 0.开启 1.关闭")
    private Integer status;

    @ApiModelProperty(value = "cms用户Id")
    private Long userId;

    /**
     * 删除标记 0:正常 1:删除
     */
    private Integer delFlag;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createdAt;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createdBy;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    private String changedBy;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改时间")
    private Date changedAt;

    /**
     * 乐观锁
     */
    @Version
    @JsonIgnore
    private Integer version;

}
